package model

import (
	"gorm.io/datatypes"
	"zsc-boot/core/orm"
)

type Dictionary struct {
	orm.Model
	Key         string         `json:"key" gorm:"column:key;size:128;"`
	Value       datatypes.JSON `json:"value" gorm:"column:value;"`
	Type        string         `json:"type" grom:"column:type;size:64"`
	Sort        uint           `json:"sort" gorm:"column:sort;default:0;comment:排序值"`
	Remarks     string         `json:"remarks" gorm:"column:remarks;size:255;comment:备注;default:''"`
	IsDeletable bool           `json:"isDeletable" gorm:"column:is_deletable;default:true;comment:是否可以删除"`
}

func (Dictionary) TableName() string {
	return "dictionary"
}

func (Dictionary) TableComment() string {
	return "字典表/公告表"
}
